const state = {
        activeName: 'first',
    }
    /*action里面可以放异步操作*/
const actions = {
    changName({ commit }, num) {
        commit('setName', num) /*commit('里面放mutation方法里面的名字')*/
    }
}

const mutations = {
    setName(state, activeName) {
        state.activeName = activeName;
    }
}
export default {
    state,
    actions,
    mutations
}